Comparison of Methods for Logic-Query Implementation
نویسندگان
چکیده
D A logic query Q is a triple (G, LP, D), where G is the query goal, LP is a logic program without function symbols, and D is a set of facts, possibly stored as tuples of a relational database. The answers of Q are all facts that can be inferred from LP U D and unify with G. A logic query is bound if some argument of the query goal is a constant; it is canonical strongly linear (a CSL query) if LP contains exactly one recursive rule and this rule is linear, i.e., only one recursive predicate occurs in its body. In this paper, the problem of finding the answers of a bound CSL query is studied with the aim of comparing for efficiency some well-known methods for implementing logic queries: the eager method, the counting method, and the magic-set method. It is shown that the above methods can be expressed as algorithms for finding particular paths in a directed graph associated to the query. Within this graphical formalism, a worst-case complexity analysis of the three methods is performed. It turns out that the counting method has the best upper bound for noncyclic queries. On the other hand, since the counting method is not safe if queries are cyclic, the method is extended to safely implement this kind of queries as well. a
منابع مشابه
A Minimal-Cost Inherent-Feedback Approach for Low-Power MRF-Based Logic Gates
The Markov random field (MRF) theory has been accepted as a highly effective framework for designing noise-tolerant nanometer digital VLSI circuits. In MRF-based design, proper feedback lines are used to control noise and keep the circuits in their valid states. However, this methodology has encountered two major problems that have limited the application of highly noise immune MRF-based circui...
متن کاملPrivate Key based query on encrypted data
Nowadays, users of information systems have inclination to use a central server to decrease data transferring and maintenance costs. Since such a system is not so trustworthy, users' data usually upkeeps encrypted. However, encryption is not a nostrum for security problems and cannot guarantee the data security. In other words, there are some techniques that can endanger security of encrypted d...
متن کاملImplementation of an efficient Fuzzy Logic based Information Retrieval System
This paper exemplifies the implementation of an efficient Information Retrieval (IR) System to compute the similarity between a dataset and a query using Fuzzy Logic. TREC dataset has been used for the same purpose. The dataset is parsed to generate keywords index which is used for the similarity comparison with the user query. Each query is assigned a score value based on its fuzzy similarity ...
متن کاملDesign and PLC Implementation for Speed Control of DC Motor using Fuzzy Logic
In this article, a speed control of DC motor is designed and illustrated using fuzzy logic-based programmable logic controller (PLC). The DC motor is an attractive part of electrical equipment in many industrial applications requiring variable speed and load specifications due to its ease of controllability. The designed system is consisted of three main parts including programmable logic contr...
متن کاملQuery Answering Systems in the Semantic Web
In this paper a new query answering system is presented for querying knowledge bases in the Semantic Web. The implementation follows the DAML+OIL Query Language Abstract Speci cation (DQL) and supports acyclic conjunctive queries. The system uses a Description Logic (DL) reasoner to answer the queries and the conjunctive queries are transformed into DL retrieval or boolean queries. After the in...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- J. Log. Program.
دوره 10 شماره
صفحات -
تاریخ انتشار 1991